@extends('layouts.student')

@section('content')
<div class="page-content">
    <div class="row">
        <div class="alert alert-info">
            欢迎访问宜春学院论文管理系统！
        </div>
        <div class="hr hr-18 dotted hr-double"></div>
        <div class="col-sm-6">

            <div class="widget-box transparent">

                <div class="widget-header widget-header-flat">

                    <h4 class="lighter">

                        <i class="icon-star orange"></i>

                        通知

                    </h4>



                    <div class="widget-toolbar">

                        <a href="#" data-action="collapse">

                            <i class="icon-chevron-up"></i>

                        </a>

                    </div>

                </div>



                <div class="widget-body">

                    <div class="widget-main no-padding table-responsive">

                        <table id="sample-table-1"  class="table table-striped table-bordered table-hover">
                            <tbody>
                                @foreach($articles as $article)
                                <tr>
                                    <td><a href="{{ url('article/'.$article->id) }}">{{$article->title}}</a></td>
                                </tr>
                                @endforeach
                            </tbody>
                        </table>

                    </div><!-- /widget-main -->

                </div><!-- /widget-body -->

            </div><!-- /widget-box -->

        </div>



        <div class="col-sm-6">

            <div class="widget-box transparent">

                <div class="widget-header widget-header-flat">

                    <h4 class="lighter">

                        <i class="icon-signal"></i>

                        模板下载

                    </h4>



                    <div class="widget-toolbar">

                        <a href="#" data-action="collapse">

                            <i class="icon-chevron-up"></i>

                        </a>

                    </div>

                </div>



                <div class="widget-body">

                    <div class="widget-main no-padding table-responsive">

                        <table id="sample-table-2"  class="table table-striped table-bordered table-hover">
                            <tbody>
                                @foreach($templates as $template)
                                <tr>
                                    <td><a href="{{ url('template/'.$template->id) }}">{{$template->title}}</a></td>
                                </tr>
                                @endforeach
                            </tbody>
                        </table>

                    </div><!-- /widget-main -->

                </div><!-- /widget-body -->
            </div><!-- /widget-box -->

        </div>

    </div>
</div>
<script type="text/javascript">
    
    jQuery(function($) {

        var oTable1 = $('#sample-table-1').dataTable( {
            "aoColumns": [
              { "bSortable": false },
            ],
            "oLanguage": {
            "sLengthMenu": "每页显示 _MENU_ 条记录",
            "sZeroRecords": "抱歉， 没有找到",
            "sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
            "sInfoEmpty": "没有数据",
            "sInfoFiltered": "(从 _MAX_ 条数据中检索)",
            "oPaginate": {
                "sFirst": "首页",
                "sPrevious": "前一页",
                "sNext": "后一页",
                "sLast": "尾页"
            },
            "sZeroRecords": "没有检索到数据",
            }
         });

        var oTable2 = $('#sample-table-2').dataTable( {
            "aoColumns": [
              { "bSortable": false },
            ],
            "oLanguage": {
            "sLengthMenu": "每页显示 _MENU_ 条记录",
            "sZeroRecords": "抱歉， 没有找到",
            "sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
            "sInfoEmpty": "没有数据",
            "sInfoFiltered": "(从 _MAX_ 条数据中检索)",
            "oPaginate": {
                "sFirst": "首页",
                "sPrevious": "前一页",
                "sNext": "后一页",
                "sLast": "尾页"
            },
            "sZeroRecords": "没有检索到数据",
            }
         });

    });
</script>
@endsection
